package com.yyi.springcloud.controller;


import com.yyi.springcloud.entities.SystemInfoModel;
import com.yyi.springcloud.service.Local_SystemInfoService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/mysqlapi/SystemInfo")
public class Mysql_SystemInfoController {

	@Resource
	private Local_SystemInfoService systemInfoService;

	//查询系统信息
	//http://localhost:8080/bxxs/mysqlapi/SystemInfo/getSystemInfo
	@ResponseBody
	@RequestMapping(value = "/getSystemInfo", method = RequestMethod.GET)
	public List<SystemInfoModel> getSystemInfo(String labcode) {
		SystemInfoModel systemInfoModel=new SystemInfoModel();
		if(!StringUtils.isEmpty(labcode)){
			systemInfoModel.setLabcode(labcode);
		}
		List<SystemInfoModel> systemInfoModelList = systemInfoService.getSystemInfoByCondition(systemInfoModel);
		return systemInfoModelList;
	}
}
